//
// Created by Administrator on 2025/3/25.
//

#include "word_query_controller.h"
// 键盘连接或断开
void word_query_keyboard_switch_dao() {
    // 界面中键盘状态
    bool is_with_keyboard = ui_word_query_data.is_with_keyboard;
    // 获取键盘连接状态
    bool is_connect_keyboard = get_keyboard_connect_status();

    // 如果不一样则切换界面
    if(is_with_keyboard != is_connect_keyboard){

        ui_word_query_data.is_with_keyboard = is_connect_keyboard;
        /**
         *  删除当前界面
         */
        if(is_connect_keyboard){
            // 当前是没键盘界面
//            ui_word_query_main_screen_deinit();
            word_query_module.screen->deinit_cb();
            ui_word_query_with_keyboard_show();
        }else{
            // 当前是有键盘界面
//            ui_word_query_with_keyboard_deinit();
            word_query_module.screen->deinit_cb();
            ui_word_query_main_screen_show();


        }
    }
}